#include "stdafx.h"
#include "plane.h"

using namespace mpr;

//////////////////////////////////////////
// TPlane ////////////////////////////////
//////////////////////////////////////////
/**
TPlane::TPlane( const TPlaneInfo &plane )
: data(NULL)
, thickness(1)
{
	w = plane.orientRow;
	h = plane.orientCol;
	p = plane.pos;

	width = plane.width / plane.spacing;
	height = plane.height / plane.spacing;
}
/**/
//////////////////////////////////////////
// TPlanesList ///////////////////////////
//////////////////////////////////////////
/**
void TPlanesList::addPlane( QVector3D w, QVector3D h, QVector3D p, int thickness )
{
	TPlane pl;
	pl.w = w;
	pl.h = h;
	pl.p = p;
	pl.thickness = thickness;

	append( pl );
}
//
void TPlanesList::addPlane( float wx, float wy, float wz, float hx, float hy, float hz
		 , float px, float py, float pz, int thickness )
{
	TPlane pl;
	pl.w = QVector3D( wx, wy, wz );
	pl.h = QVector3D( hx, hy, hz );
	pl.p = QVector3D( px, py, pz );
	pl.thickness = thickness;

	append( pl );
}
/**/